<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      function info() {
        var age = 18;
      }
      info();
      console.log(age);  // 报错，提示age is not defined（age未定义）
    </script>
  </body>
</html>